package com.hy.lightning.boot.core;

import java.util.Arrays;

public class ServiceConfiguration {

	private String name;//服务名称=service/method
	
	private String classPath;//service路径
	
	private String[] paramNames;//参数名称
	
	private Class<?>[] paramTypes;//参数类型

	private String respType;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getClassPath() {
		return classPath;
	}

	public void setClassPath(String classPath) {
		this.classPath = classPath;
	}

	public String[] getParamNames() {
		return paramNames;
	}

	public void setParamNames(String[] paramNames) {
		this.paramNames = paramNames;
	}

	public Class<?>[] getParamTypes() {
		return paramTypes;
	}

	public void setParamTypes(Class<?>[] paramTypes) {
		this.paramTypes = paramTypes;
	}

	public String getRespType() {
		return respType;
	}

	public ServiceConfiguration(String name, String classPath, String[] paramNames, Class<?>[] paramTypes, String respType) {
		this.name = name;
		this.classPath = classPath;
		this.paramNames = paramNames;
		this.paramTypes = paramTypes;
		this.respType = respType;
	}
	
	@Override
	public String toString() {
		return String.format("name:%s,classPath:%s,params:(%s),paramTypes:(%s),respType:%s", name, classPath, Arrays.deepToString(paramNames), Arrays.deepToString(paramTypes), respType);
	}
	
	public static final String NAME = "name";
	
	public static final String CLASSPATH = "classPath";
	
	public static final String PARAMNAMES = "paramNames";
	
	public static final String PARAMTYPES = "paramTypes";
	
	public static final String RESPTYPE = "respType";
}
